/*
 * $Id: qtcQTableWidgetItem.cpp 10 2010-11-09 01:11:36Z tfonrouge $
 */

#include "qtharbour.h"

#include <QTableWidgetItem>

HB_FUNC( QTABLEWIDGETITEM_NEW )
{
    xho_ObjParams objParams = xho_ObjParams( NULL );
    
    QTableWidgetItem* tableWidgetItem = NULL;

    if( hb_pcount() == 0 || HB_ISNUM( 1 ) )
    {
        tableWidgetItem = new QTableWidgetItem( hb_parni( 1 ) );
    }
    else if( HB_ISCHAR( 1 ) )
    {
        tableWidgetItem = new QTableWidgetItem( qth_parc( 1 ), hb_parni( 2 ) );
    }
    else if( HB_ISCHAR( 2 ) )
    {
        tableWidgetItem = new QTableWidgetItem( *(QIcon *) xho_par_XhoObject( 1 ), qth_parc( 2 ), hb_parni( 3 ) );
    }

    objParams.Return( (QObject *) tableWidgetItem );
}

/* <QTH_GEN> */
HB_FUNC( QTABLEWIDGETITEM_BACKGROUND )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->background();
    }
}

HB_FUNC( QTABLEWIDGETITEM_CHECKSTATE )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->checkState() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_COLUMN )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->column() + 1 );
    }
}

HB_FUNC( QTABLEWIDGETITEM_FLAGS )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->flags() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_FONT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->font();
    }
}

HB_FUNC( QTABLEWIDGETITEM_FOREGROUND )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->foreground();
    }
}

HB_FUNC( QTABLEWIDGETITEM_ICON )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->icon();
    }
}

HB_FUNC( QTABLEWIDGETITEM_ISSELECTED )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retl( tableWidgetItem->isSelected() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_ROW )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->row() + 1 );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETBACKGROUND )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setBackground( *(QBrush *) xho_par_XhoObject( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETCHECKSTATE )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setCheckState( (Qt::CheckState) hb_parni( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETFLAGS )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setFlags( (Qt::ItemFlags) hb_parni( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETFONT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setFont( *(QFont *) xho_par_XhoObject( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETFOREGROUND )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setForeground( *(QBrush *) xho_par_XhoObject( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETICON )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setIcon( *(QIcon *) xho_par_XhoObject( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETSELECTED )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setSelected( hb_parl( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETSIZEHINT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setSizeHint( *(QSize *) xho_par_XhoObject( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETSTATUSTIP )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setStatusTip( qth_parc( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETTEXT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setText( qth_parc( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETTEXTALIGNMENT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setTextAlignment( hb_parni( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETTOOLTIP )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setToolTip( qth_parc( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SETWHATSTHIS )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->setWhatsThis( qth_parc( 1 ) );
    }
}

HB_FUNC( QTABLEWIDGETITEM_SIZEHINT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        tableWidgetItem->sizeHint();
    }
}

HB_FUNC( QTABLEWIDGETITEM_STATUSTIP )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        qth_retc( tableWidgetItem->statusTip() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_TABLEWIDGET )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        xho_itemReturn( (QObject *) tableWidgetItem->tableWidget() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_TEXT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        qth_retc( tableWidgetItem->text() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_TEXTALIGNMENT )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->textAlignment() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_TOOLTIP )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        qth_retc( tableWidgetItem->toolTip() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_TYPE )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        hb_retni( tableWidgetItem->type() );
    }
}

HB_FUNC( QTABLEWIDGETITEM_WHATSTHIS )
{
    QTableWidgetItem* tableWidgetItem = (QTableWidgetItem *) xho_itemListGet_XHO( hb_stackSelfItem() );

    if( tableWidgetItem )
    {
        qth_retc( tableWidgetItem->whatsThis() );
    }
}

/* </QTH_GEN> */
